const mongoose = require('./db/mongoose');

const NewsSchema = new mongoose.Schema({
    title: {
        type: String,
        required: true
    },
    content: String,
    date: {
        type: Date,
        default: new Date()
    }
});

module.exports = mongoose.model('News', NewsSchema, 'news');